package com.ccys.cms.service.corporateAndInsurance.impl;

import com.ccys.cms.service.corporateAndInsurance.CDMPEnrolmentService;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.corporateAndInsurance.CDMPEnrolmentDto;
import com.ccys.db.entity.TblCdmpBenefitMember;
import com.ccys.db.mapper.TblCdmpBenefitMemberMapper;
import com.ccys.db.page.PageDto;
import com.ccys.db.rely.service.impl.BaseServiceImpl;
import com.ccys.db.vo.corporateAndInsurance.CDMPBenefitVo;
import com.ccys.db.vo.corporateAndInsurance.CDMPEnrolmentVo;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CDMPEnrolmentServiceImpl extends BaseServiceImpl<TblCdmpBenefitMember> implements CDMPEnrolmentService {


    @Resource
    private TblCdmpBenefitMemberMapper mapper;

    @Override
    public ResponseResult getPage(CDMPEnrolmentDto dto) {
        PageDto.startPage();
        List<CDMPEnrolmentVo> list = mapper.getList(dto);
        PageInfo<CDMPEnrolmentVo> info = new PageInfo<>(list);
        return ResponseResult.success(info);
    }
}
